package io.github.talelin.latticy.controller.api;

import io.github.talelin.core.annotation.LoginRequired;
import io.github.talelin.latticy.service.MenuService;
import io.github.talelin.latticy.vo.MenuVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.awt.*;

@RestController
@RequestMapping("/cms/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    /**
     * 菜单显示的红点
     * @return
     */
    @GetMapping("/unfinish")
    @LoginRequired
    public MenuVO unfinishNum() {
        return menuService.getUnfinishNum();
    }

}
